package com.wgod.demo.business.mapper;

import com.wgod.demo.business.model.AttAchModel;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import com.wgod.demo.business.entity.AttAchEntity;

import java.util.List;

/**
 * Created by WGod on 2018/4/29.
 */
public interface AttAchMapper extends Mapper<AttAchEntity> {


    /**
     * 添加单个附件信息
     * @param attAchEntity
     * @return
     */
    int addAttAch(AttAchEntity attAchEntity);

    /**
     * 批量添加附件信息
     * @param list
     * @return
     */
    int batchAddAttAch(List<AttAchEntity> list);

    /**
     * 根据主键编号删除附件信息
     * @param id
     * @return
     */
    int deleteAttAch(int id);

    /**
     * 更新附件信息
     * @param attAchEntity
     * @return
     */
    int updateAttAch(AttAchEntity attAchEntity);

    /**
     * 根据主键获取附件信息
     * @param id
     * @return
     */
    AttAchModel getAttAchById(@Param("id") int id);

    /**
     * 获取所有的附件信息
     * @return
     */
    List<AttAchModel> getAtts();

    /**
     * 查找附件的数量
     * @return
     */
    Long getAttsCount();
}
